{include file="header.html"}
<script type="text/javascript" src="templates/js/jquery.colorbox.js" charset="utf-8"></script>
<link href="templates/style/colorbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function(){
	
})
function video(id){
		$w=$(window).width();
	    $h=$(window).height();
	    $w=$w*0.7;
	    $("#tagframe").width($w);
		$("#tagframe").attr("src","index.php?app=video&act=video&id="+id);
	    $.colorbox({
	        width : $w+20,
	        height : "650px",
	        inline : true,
	        href : "#taglist"
	    });
	}
</script>
<div style="display: none"  >
	<div id="taglist">
	<iframe id="tagframe" src="index.php?app=video&act=video"  width="800px" height="600px" frameborder="0" scrolling="no"></iframe>
	</div>
</div>
<div id="rightTop">
    <p>{$lang.video}</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
        <li><a class="btn1" href="index.php?app=video&amp;act=add">{$lang.add}</a></li>
    </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get">
            <div class="left">
                <input type="hidden" name="app" value="video" />
                <input type="hidden" name="act" value="index" />
                {$lang.content}
                <input class="queryInput" type="text" name="content" value="{$query.content|escape}" />
                {$lang.checked}
                <select class="querySelect" id="cate_id" name="checked">
                <option value="">{$lang.select_pls}</option>
                {html_options options=$checked selected=$smarty.get.checked}
                </select>
                <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=video">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">
        {include file=page.top.html}
    </div>
    <div class="clear:both;"></div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $videos}-->
        <tr class="tatr1">
            <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
            <td align="left">{$lang.content}</td>
            <td>{$lang.username} | {$lang.realname}</td>
            <td>上传视频</td>
            <td style="text-align:center;">{$lang.play_num}</td>
            <td style="text-align:center;">{$lang.follow_num}</td>
            <td style="text-align:center;">{$lang.share_num}</td>
            <td style="text-align:center;">{$lang.comment_num}</td>
            <td style="text-align:center;">{$lang.pubdate}</td>
            <td style="text-align:center;">{$lang.hot}</td>
            <td style="text-align:center;">{$lang.rec}</td>
            <td style="text-align:center;">{$lang.checked}</td>
            <td style="text-align:center;">{$lang.sort_order}</td>
            <td style="text-align:center;">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$videos item=video}-->
        <tr class="tatr2">
            <td class="firstCell"><input type="checkbox" class="checkitem" value="{$video.video_id}"/></td>
            <td>{$video.content|escape|truncate:15}</td>
            <td>{$video.user_name|escape} | {$video.real_name|escape}</td>
            <td>
				<a href="javascript:void(0);" onclick="video({$video.video_id})">查看视频</a>
			</td>
			<td style="text-align:center;">{$video.play_num|escape}</td>
			<td style="text-align:center;">{$video.follow_num|escape}</td>
			<td style="text-align:center;">{$video.share_num|escape}</td>
			<td style="text-align:center;">{$video.comment_num|escape}</td>
            <td style="text-align:center;">{$video.pubdate|date:Y-m-d H:i}</td>
            <td style="text-align:center;">
				<!-- {if $video.hot eq 1} -->
	            <img src="{res file=style/images/positive_enabled.gif}" ectype="inline_edit" fieldname="hot" fieldid="{$video.video_id}" fieldvalue="1" title="{$lang.editable}"/>
	            <!--{else}-->
	            <img src="{res file=style/images/positive_disabled.gif}" ectype="inline_edit" fieldname="hot" fieldid="{$video.video_id}" fieldvalue="0" title="{$lang.editable}"/>
	            <!-- {/if} -->
			</td>
            <td style="text-align:center;">
				<!-- {if $video.rec eq 1} -->
	            <img src="{res file=style/images/positive_enabled.gif}" ectype="inline_edit" fieldname="rec" fieldid="{$video.video_id}" fieldvalue="1" title="{$lang.editable}"/>
	            <!--{else}-->
	            <img src="{res file=style/images/positive_disabled.gif}" ectype="inline_edit" fieldname="rec" fieldid="{$video.video_id}" fieldvalue="0" title="{$lang.editable}"/>
	            <!-- {/if} -->
			</td>
            <td style="text-align:center;">{if $video.checked eq 1}已审核{else}未审核{/if}</td>
            <td style="text-align:center;">
				<span ectype="inline_edit" fieldname="sort_order" fieldid="{$video.video_id}" datatype="pint" maxvalue="255" class="editable" title="{$lang.editable}">{$video.sort_order}</span>
			</td>
			<td style="text-align:center;">
                <a href="index.php?app=video&amp;act=edit&amp;id={$video.video_id}">查看</a>
			</td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="7">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <!--{if $videos}-->
    <div id="dataFuncs">
        <div class="pageLinks">
            {include file=page.bottom.html}
        </div>
        <div id="batchAction" class="left paddingT15">
            &nbsp;&nbsp;
            <input class="formbtn batchButton" type="button" value="审核" name="id" uri="index.php?app=video&act=Auditing" presubmit="confirm('{$lang.Auditing_confirm}');" />
            &nbsp;&nbsp;
             <input class="formbtn batchButton" type="button" value="删除" name="id" uri="index.php?app=video&act=drop" presubmit="confirm('确定删除选择的视频');" />
            <!--<input class="formbtn batchButton" type="button" value="lang.update_order" name="id" presubmit="updateOrder(this);" />-->
        </div>
        <div class="clear:both;"></div>
    </div>
    <div class="clear"></div>
    <!--{/if}-->
</div>
{include file="footer.html"}
